home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / BC3.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  115 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Borland C++ 3.1 version.
  12. #
  13. # $Id: bc3.mk 1.1 1995/02/06 12:49:39 kjb release $
  14. #
  15. #############################################################################
  16.  
  17. # Disable warnings for macros redefined here that were given
  18. # on the command line.
  19. __.SILENT       := $(.SILENT)
  20. .SILENT         := yes
  21.  
  22. # File suffix definitions
  23.    L            := .lib   # Libraries
  24.    E            := .exe   # Executables
  25.    O            := .obj   # Objects
  26.    A            := .asm   # Assembler sources
  27.    P            := .cpp   # C++ sources
  28.  
  29. # Import enivornment variables that we use
  30. TMPDIR := $(ROOTDIR)/tmp
  31. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA FPU
  32.  
  33. # We use the MSDOS shell at all times
  34.    SHELL        := $(COMSPEC)
  35.    GROUPSHELL   := $(SHELL)
  36.    SHELLFLAGS   := $(SWITCHAR)c
  37.    GROUPFLAGS   := $(SHELLFLAGS)
  38.    SHELLMETAS   := *"?<>
  39.    GROUPSUFFIX  := .bat
  40.    DIRSEPSTR    := \\
  41.    DIVFILE       = $(TMPFILE:s,/,\)
  42.  
  43. # Default commands for compiling, assembling linking and archiving
  44.    CC           := bcc      # C-compiler and flags
  45.    CFLAGS       := -ml -H=bcc.sym
  46.    AS           := tasm     # Assembler and flags
  47.    ASFLAGS      := /mx /m /i$(SCITECH)\INCLUDE
  48.    LD           := bcc      # Loader and flags
  49.    LDFLAGS       = $(CFLAGS)
  50.    LIB          := tlib     # Librarian
  51.    LIBFLAGS     := /C
  52.  
  53. # Optionally turn on debugging information
  54. .IF $(DBG)
  55.    CFLAGS       += -v       # Turn on debugging for C compiler
  56.    ASFLAGS      += /zi      # Turn on debugging for assembler
  57.    LIBFLAGS     += /P128    # Larger page size for libraries with debug info!
  58. .END
  59.  
  60. # Optionally turn on optimisations
  61. .IF $(OPT)
  62.    CFLAGS       += -3 -O2
  63. .END
  64.                                          
  65. # Optionally turn on direct i387 FPU instructions
  66.  
  67. .IF $(FPU)
  68.    CFLAGS       += -f287 -DFPU387
  69.    ASFLAGS      += -DFPU387
  70. .END
  71.  
  72. # Optionally compile a shareware version of a product
  73. .IF $(SHW)
  74.    LIB_DIR      := LIBSW
  75.    CFLAGS       += -DSHAREWARE
  76. .ELSE
  77.    LIB_DIR      := LIB
  78. .END
  79.  
  80. # Optionally compile a beta release version of a product
  81. .IF $(BETA)
  82.    CFLAGS       += -DBETA
  83.    ASFLAGS      += -DBETA
  84. .END
  85.  
  86. # Define where to install library files
  87.    LIB_DEST     := $(SCITECH)\$(LIB_DIR)\BC3
  88.  
  89. # Definition of $(MAKE) macro for recursive makes.
  90.    MAKE = $(MAKECMD) $(MFLAGS)
  91.  
  92. # Macro to install a library file
  93.    INSTALL      := cp
  94.  
  95. # Implicit generation rules for making object files
  96.    %$O: %.c ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
  97.    %$O: %$P ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
  98.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  99.  
  100. # Implicit rule for building a library file using response file
  101.    %$L:      ; $(LIB) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
  102.  
  103. # Implicit rule for building an executable file using response file
  104.    %$E:      ; $(LD) @$(mktmp $(LDFLAGS) -e$@ $(&:s/\/\\) pmode.lib $(EXELIBS))
  105.  
  106. # DMAKE uses this recipe to remove intermediate targets
  107. .REMOVE :; $(RM) -f $<
  108.  
  109. # Turn warnings back to previous setting.
  110. .SILENT := $(__.SILENT)
  111.  
  112. # We dont use TABS in our makefiles
  113. .NOTABS         := yes
  114.  
  115.